package com.chushouya.order.constants;


import com.general.framework.core.enums.IEnum;
import com.general.framework.core.lang.Strings;

import java.util.Objects;

public enum PartnerNotifyTypeEnum implements IEnum<String> {
    CREATE(PartnerNotifyTypeKeys.CREATE, "订单创建"),
    DELIVERY(PartnerNotifyTypeKeys.DELIVERY, "用户寄出回收产品"),
    DISPATCH(PartnerNotifyTypeKeys.DISPATCH, "订单派单成功"),
    CONFIRM(PartnerNotifyTypeKeys.CONFIRM, "工程师接单"),
    VISIT(PartnerNotifyTypeKeys.VISIT, "工程师上门"),
    CANCEL(PartnerNotifyTypeKeys.CANCEL, "订单取消"),
    COMPLETE(PartnerNotifyTypeKeys.COMPLETE, "订单完成"),
    CHANGE(PartnerNotifyTypeKeys.CHANGE, "订单信息变更"),
    RECEIVE(PartnerNotifyTypeKeys.RECEIVE, "订单签收"),
    SALE(PartnerNotifyTypeKeys.SALE, "机器销售"),
    QUALITY(PartnerNotifyTypeKeys.QUALITY, "订单质检"),
    SIGN(PartnerNotifyTypeKeys.WALLETSIGN, "无忧付签约通知"),
    WALLETPAY(PartnerNotifyTypeKeys.WALLETPAY, "无忧付支付通知"),;



    private String value;

    private String desc;

    PartnerNotifyTypeEnum(String value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public static String getDesc(String status) {
        for (PartnerNotifyTypeEnum thisEnum : PartnerNotifyTypeEnum.values()) {
            if (Objects.equals(thisEnum.value, status)) {
                return thisEnum.desc;
            }
        }
        return Strings.EMPTY;
    }

    @Override
    public String value() {
        return this.value;
    }

    @Override
    public String named() {
        return this.desc;
    }
}
